﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using Castle.ActiveRecord;
using Castle.ActiveRecord.Framework;
//using Info24k99.Model;
using System.Reflection;

namespace Info24k99.Web
{
    public class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            //IConfigurationSource source = (IConfigurationSource)ConfigurationManager.GetSection("ActiveRecord");
            //ActiveRecordStarter.Initialize(Assembly.Load("Mang24k99.Model"), source);

            Castle.ActiveRecord.Framework.IConfigurationSource source = System.Configuration.ConfigurationManager.GetSection("ActiveRecord") as Castle.ActiveRecord.Framework.IConfigurationSource;
            Assembly[] assemblys = new Assembly[] { 
                Assembly.Load("Mang24k99.Model"),
                Assembly.Load("InfoGrant.Model"),
            };
            Castle.ActiveRecord.ActiveRecordStarter.Initialize(assemblys, source);

        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}